package ltd.smallwang;

import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;

/**
 * @author justd
 * @date 2024-10-13 00:19
 */
class Leetcode0151Test {

  private final Leetcode0151 leetcode0151 = new Leetcode0151();

  @Test
  void reverseWords01() {
    Assertions.assertThat(leetcode0151.reverseWords("the sky is blue"))
        .isEqualTo("blue is sky the");
  }

  @Test
  void reverseWords02() {
    Assertions.assertThat(leetcode0151.reverseWords("  hello world  "))
        .isEqualTo("world hello");
  }

  @Test
  void reverseWords03() {
    Assertions.assertThat(leetcode0151.reverseWords("a good   example"))
        .isEqualTo("example good a");
  }

}